package com.hsj.controller;

import com.hsj.service.OrderServiceUseDubbo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *   使用dubbo 进行 rpc
 */
@RestController
public class OrderControllerUserDubbo {

    @Autowired
    private OrderServiceUseDubbo orderService;
    @RequestMapping("/dubbo/getorder")
    public String getOrder(){
        return  orderService.getOrder();
    }


    @RequestMapping("/dubboStream/getorder")
    public String getOrder1(){
        return orderService.getSayHelloUseTripleStream();
    }

    @RequestMapping("/dubbo2Stream/getorder")
    public String getOrder2(){
        return orderService.getSayHelloUse2Stream();
    }



}
